package com.作业.Day3;

import java.util.Scanner;

public class Homework5 {
    public static void main(String[] args) {
        /**
         * 统计打折数量
         */
        Scanner scanner = new Scanner(System.in);
        for (int i = 0; i < 3; i++) {
            int a = i + 1;
            int m = 0;//商品价格
            int b = 0;//哪件商品享受优惠
            System.out.println("请输入第" + a + "个人所购买的三件商品的价格:");
            for (int j = 0; j < 3; j++) {
                m = scanner.nextInt();
                if (m >= 300) {
                    b += 1;
                }

            }
            System.out.println("第" + a + "个人共有" + b + "件商品享受八折优惠");
        }
    }
}
